@charset "UTF-8";
//@if
$isIE7:false;
div{
    display: inline-block;
    @if $isIE7{
        *display:inline;
        *zoom:1;
    }@else{
        display: block;
    }
}

//@if{}@else if{} @else{}
$type:1;
$color1:red !default;
@if $type==1 {
    $color1:red;
    // $color2:
}@else if $type==2{
    $color1:green;
}
div{
    // @if $type == 1{
    //     background: red;
    // }@else if $type == 2{
    //     background: blue;
    // }@else{
    //     background: green;
    // }
    width: 100px;
    height: 100px;
    background: $color1;
}

/* @for
@for $i from start through end  包含开始和结束
@for $i from start to end       不包含结束

*/

@for $i from 1 through 12{
    .col-xs-#{$i}{
        float: left;
        width: $i * 100 / 12 * 1%;
    }
}

// @each $val in listormap
/* 
    @each $k,$v in map;
    $k代表map中的键 
    $v代表map中的键值

*/
$list: 1 2 3 4 5 6;
$map:(top:3px solid black,right:1px solid red,bottom:10px solid pink,left: 2px solid);
div{
    @each $k,$v in $map{
        border-#{$k}: $v;
    }
}


// @each $v in $list{
//     .col-xs-#{$v}{
//         color: red;
//     }
// }

